{{template "header" .}}
<h1 class="mt-3 md-3">{{.Title}}</h1>

<p>[<a href="/edit/{{.Title}}">edit</a>]</p>

<div>
	{{markdown .Body}}
</div>
{{if .Data}}
<table class="table table-hover caption-top">
    <caption>List of attachments</caption>
    <thead>
	<tr>
	    <th scope="col">#</th>
	    <th scope="col">Title</th>
	    <th scope="col">Size</th>
	    <th scope="col">Update Time</th>
	</tr>
    </thead>
    <tbody>
	{{$title := .Title}}
	{{range $i, $data := .Data}}
	<tr>
	    <th scope="row">{{plusOne $i}}</th>
	    <td><a href="/src/{{$title}}/{{$data.Name}}" target="_blank">{{$data.Name}}</a></td>
	    <td>{{byteCountSI $data.Size}}</td>
	    <td>{{smartTime $data.ModTime}}</td>
	</tr>
	{{end}}
    </tbody>
</table>
{{end}}
{{template "footer" .}}
